// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import Router from 'vue-router'
import $ from 'jquery'
import 'jquery'

import { Icon } from 'vant';
import { Row, Col } from 'vant';
import { Tab, Tabs } from 'vant';
import axios from 'axios';
import VueAxios from 'vue-axios';
import { Toast } from 'vant';
import 'vant/lib/vant-css/index.css'
import MuseUI from 'muse-ui';
import 'muse-ui/dist/muse-ui.css';
import globe from './components/globel.vue'
import VueWechatTitle from 'vue-wechat-title';
import qs from 'qs'
import { Swipe, SwipeItem } from 'vant';
import { Loadmore } from 'mint-ui';
import Loading from 'muse-ui-loading';

Vue.component(Loadmore.name, Loadmore);
Vue.use(Swipe).use(SwipeItem);
Vue.use(VueWechatTitle)
window.axios = axios;
Vue.use(MuseUI);
Vue.use(Toast);
Vue.use(VueAxios, axios)
Vue.prototype.$ = $;
Vue.config.productionTip = false;
Vue.use(Icon);
Vue.use(Row).use(Col);
Vue.use(Tab).use(Tabs);
Vue.prototype._globe =globe;
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>',

})
import './assets/js/date'
router.afterEach((to,from,next) => {
  window.scrollTo(0,0);
});


router.beforeEach((to, from, next) => {
  if (to.meta.title) {
    document.title = to.meta.title
  }
  next()
})
